package org.bpel.sample.bpel.sample;

public class PlaceorderProxy implements org.bpel.sample.bpel.sample.Placeorder_PortType {
  private String _endpoint = null;
  private org.bpel.sample.bpel.sample.Placeorder_PortType placeorder_PortType = null;
  
  public PlaceorderProxy() {
    _initPlaceorderProxy();
  }
  
  public PlaceorderProxy(String endpoint) {
    _endpoint = endpoint;
    _initPlaceorderProxy();
  }
  
  private void _initPlaceorderProxy() {
    try {
      placeorder_PortType = (new org.bpel.sample.bpel.sample.Placeorder_ServiceLocator()).getplaceorder();
      if (placeorder_PortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)placeorder_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)placeorder_PortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (placeorder_PortType != null)
      ((javax.xml.rpc.Stub)placeorder_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.bpel.sample.bpel.sample.Placeorder_PortType getPlaceorder_PortType() {
    if (placeorder_PortType == null)
      _initPlaceorderProxy();
    return placeorder_PortType;
  }
  
  public java.lang.String process(java.lang.String customername, int amount, java.util.Calendar date, org.bpel.sample.bpel.sample.PlaceorderRequestOrder order) throws java.rmi.RemoteException{
    if (placeorder_PortType == null)
      _initPlaceorderProxy();
    return placeorder_PortType.process(customername, amount, date, order);
  }
  
  
}